<template>
	<!-- 药库 -->
	<view class="pharmacy">
		<web-header :select_name="'pharmacy'"></web-header>
		<view class="content_template">
			<view class="content_left" style="">
				<view class="h5_content">


					<!-- 标题模板 -->
					<view class="header_title">
						<view class="header">
							<view class="title">药库</view>
							<!-- <image src="/static/2.1/btn_more.png"></image> -->
						</view>
						<view class="line"></view>
					</view>
					<view class="content h5_padding">
					<view class="pharmacy_info">
						<template v-if="details.detailImagesList.length > 0">
							<image class="img" mode="aspectFit" :src="details.detailImagesList[0].fullUrl"></image>

						</template>
						<view>
							药品名称：{{details.medicineName}}
						</view>
						<view>通用名称：{{details.commonName}}</view>
						<view>英文名称：{{details.englishName}}</view>
						<view>癌种类型：{{details.typeName}}</view>
						<view>靶点：{{details.targetName}}</view>
						<view>上市日期：{{details.listingDate}}</view>
						<view>生产厂家：{{details.manufacturer}}</view>


						<view class="pharmacy_info_content" v-html="details.content">

						</view>
					</view>
					</view>






				</view>

				<view class="content_right">
					<filtrate-card></filtrate-card>
				</view>
			</view>
		</view>

		<!-- <page-pagination style="margin-bottom: 60rpx;" @change="page_change" :currentPage='page.current'
			:total="page.total" color="#048597" :showAround="true" :btnText="true" :forceEllipses="true">
		</page-pagination> -->



		<!-- <view class="content">
			<view class="item" v-for="item in hot" @click="openInfo(item)">
				<image mode="aspectFill" :src="item.smallImage"></image>
				<view class="title">{{item.title}}</view>
				<view class="createDate">{{item.createDate}} </view>
			</view>

		</view>
		<view class="more">
			<image @click="loadData()" src="/static/article/more.png"></image>
		</view> -->


		<web-foot></web-foot>
	</view>
</template>

<script>
	import web_header from '@/components/web-header.vue'
	import web_foot from '@/components/web-foot.vue'
	//右侧筛选卡片
	import filtrate_card from '@/components/filtrate_card.vue'
	// import information_cell from '@/components/information_cell/information_cell.vue'

	export default {

		components: {
			'web-header': web_header,
			'web-foot': web_foot,
			'filtrate-card': filtrate_card,
			// 'information-cell': information_cell
		},
		data() {
			return {
				hot_page: 1,
				details: {
					content: ``,
					detailImagesList: []
				},
				page: {
					total: 88,
					size: 10,
					current: 1
				}
			}
		},
		onLoad(e) {
			this.id = e.id
			this.loadData()
		},
		methods: {
			openInfo(item) {
				console.log('打开详情')
				uni.navigateTo({
					url: './article_info?id=' + item.id
				})
			},
			page_change(currentPage, type) {
				this.hot_page = currentPage
				this.loadData()
				// this.page.currentPage = currentPage;
				console.log("点击了" + type + "，当前页：" + currentPage);
			},
			loadData() {

				this.service("/website/getMedicineStorehouse", 'get', {
					id: this.id
				}).then(res => {
					this.details = res.data
					console.log(this.details)
					uni.report('title', res.data.title)
					uni.setNavigationBarTitle({
						title: res.data.title
					})
				})
			}

		}
	}
</script>

<style lang="scss">
	@import './pharmacy.scss'
</style>
